package com.cqrcb.cloud.controller.red;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.cqrcb.cloud.config.annotation.CustomLogAnnotation;
import com.cqrcb.cloud.config.annotation.CustomValidation;
import com.cqrcb.cloud.controller.handler.BlockExceptionUtil;
import com.cqrcb.cloud.entity.api.req.Q;
import com.cqrcb.cloud.entity.api.res.R;
import com.cqrcb.cloud.entity.quota.io.CustomerMultiQuotaCtrlMarketMainIO;
import com.cqrcb.cloud.entity.quota.io.MultiQuotaCtrlMarketMainIO;
import com.cqrcb.cloud.entity.red.io.RedEnvelopeMainIO;
import com.cqrcb.cloud.service.quota.CustomerMultiQuotaCtrlMainService;
import com.cqrcb.cloud.service.quota.MultiQuotaCtrlMarketMainService;
import com.cqrcb.cloud.service.red.RedEnvelopeConditionService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
* CustomerMultiQuotaCtrlMainController
*
* @author 系统
* @date 2021-06-19 04:39:42
*/
@Slf4j
@RestController
@RequestMapping("/red")
@CrossOrigin
@Api(description = "红包")
public class RedEnvelopeController {

    @Autowired
    public RedEnvelopeConditionService redEnvelopeConditionService;

    @CustomValidation
    @CustomLogAnnotation
    @PostMapping("/receive")
    public R receive(@RequestBody Q<RedEnvelopeMainIO> redEnvelopeMainIOQ) {
        log.info("这是什么-->>>");
        R r = redEnvelopeConditionService.receive(redEnvelopeMainIOQ);
        return r;
    }



}